package com.imedway.ihe.dtz.xds.client;

import org.junit.jupiter.api.Test;
import org.openehealth.ipf.commons.ihe.xds.iti42.Iti42PortType;
import org.springframework.boot.test.context.SpringBootTest;

import com.imedway.ihe.dd.properties.ItiAddressProps;
import com.imedway.ihe.dd.util.WebserviceUtil;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@SpringBootTest
public class Iti42Client{
	
	static String serviceWsdl ="http://localhost:8080/services/iti42?wsdl";
	static String serviceNamespaceUri ="http://service.ihe.imedway.com/";
	static String serviceLocalPart = "Iti42PortTypeImplService";
	
	public Iti42PortType getClient() {
		ItiAddressProps itiAddressProps=new ItiAddressProps();
		itiAddressProps.setServiceLocalPart(serviceLocalPart);
		itiAddressProps.setServiceNamespaceUri(serviceNamespaceUri);
		Iti42PortType itiPortType = WebserviceUtil.buildWebService(Iti42PortType.class, serviceWsdl,itiAddressProps);
		return itiPortType;		
	};
		
	@Test
	public void saveDocumentInfo() {
		Iti42PortType itiPortType = getClient();
		
		
		
		itiPortType.documentRegistryRegisterDocumentSetB(null);
		
	}
	
}
